package compilers.symbolTable;

import compilers.AST.Node;
import compilers.AST.types.TypeSpecifier;

public abstract class SymbolTableElement {
	
	public static int MEMORY_ADDRESS = 0;
	
	protected int fLineNr;
	protected int fNodeId;
	protected String fIdentifier;
	protected TypeSpecifier fType;
	protected int fMemoryAddress;
	
	public void println(int identLevel, String out) {
		String result = "";
		for (int i = 1; i <= identLevel; i++) {
			result += "   ";
		}
		System.out.println(result + " -" + out);
	}
	
	public abstract void print(int identLevel);
	
	public String getIdentifier() {
		return fIdentifier;
	}
	
	public int getLineNr() {
		return fLineNr;
	}
	
	public TypeSpecifier getType() {
		return fType;
	}
	
	public int getNodeId() {
		return fNodeId;
	}
	
	public void setNodeId(int nodeId) {
		fNodeId = nodeId;
	}
	
	public int getMemoryAddress() {
		return fMemoryAddress;
	}
	
	public void setMemoryAddress(int memoryAddress) {
		fMemoryAddress = memoryAddress;
	}
}
